package com.automannn.practice.mybatis.springBootMybatis;

import com.automannn.practice.mybatis.dao.PersonDao;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author automannn
 * @Date 2022/8/22
 */
//xxx: 由于当前环境，存在mybatis-plus依赖，个别bean存在不兼容情况，暂时排除
@SpringBootApplication(exclude = {MybatisPlusAutoConfiguration.class})
@MapperScan("com.automannn.practice.mybatis.dao")
public class SpringBootMybatisTest {

    public static void main(String[] args) {
      ConfigurableApplicationContext applicationContext= SpringApplication.run(SpringBootMybatisTest.class);

     PersonDao personDao= applicationContext.getBean(PersonDao.class);
     personDao.selectList();
    }
}
